using System;
using System.Data;
using System.Web;
using System.Web.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;


public partial class MenuPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            LoadData();

        }
    }
    void LoadData()
    {
        string connectionString =
                WebConfigurationManager.ConnectionStrings[
                "RCVDB2000"].ConnectionString;

        ControlHelper cls = new
        ControlHelper(connectionString);
        cls.CommandText =
        "select * from tblMenu;"+
        "select * from tblSubMenu";
        cls.CommandType = CommandType.Text;
        cls.InitProperties();
        cls.FillDataSetToMenu(
        this.Menu1,"MenuName");         
        cls.Finalize();
    }
}
